package com.wjy.rbac.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wjy.rbac.entity.RequestMethodB;
import com.wjy.rbac.mapper.RequestMethodBMapper;
import com.wjy.rbac.service.IRequestMethodBService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ybxxszl
 * @since 2019-04-12
 */
@Service
public class RequestMethodBServiceImpl extends ServiceImpl<RequestMethodBMapper, RequestMethodB>
        implements IRequestMethodBService {

    @Override
    public void insert(List<RequestMethodB> requestMethodBs) {
        saveBatch(requestMethodBs);
    }

    @Override
    public void deleteByRequestMethodId(String requestMethodId) {
        Map<String, Object> columnMap = new HashMap<String, Object>();
        columnMap.put(RequestMethodB.REQUEST_METHOD_ID, requestMethodId);
        removeByMap(columnMap);
    }

    @Override
    public List<RequestMethodB> getByRequestMethodId(String requestMethodId) {
        Map<String, Object> columnMap = new HashMap<String, Object>();
        columnMap.put(RequestMethodB.REQUEST_METHOD_ID, requestMethodId);
        List<RequestMethodB> requestMethodBS = (List<RequestMethodB>) listByMap(columnMap);
        return requestMethodBS;
    }

}
